Skip to content

feat: enforce csp - #649

Open
nlspnsgen wants to merge 2 commits into
stagingfrom
feat/enforce-csp
Open

nlspnsgen wants to merge 2 commits into
stagingfrom
feat/enforce-csp

Conversation

@nlspnsgen

@nlspnsgen nlspnsgen commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Security
    • Applied explicit content security rules across the frontend, admin panel, and maintenance page, controlling permitted sources for content, connections, and form submissions.
    • The rules also restrict framing and block embedded objects where configured.
    • Removed the report-only security policy header; the frontend’s configured content restrictions now apply directly.

@vercel

vercel Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
baergpt-admin-panel Ready Ready Preview Nov 30, 2026 3:34pm UTC
baergpt-maintenance-mode Ready Ready Preview Nov 30, 2026 3:34pm UTC
1 Skipped Deployment
Project Deployment Actions Updated
baergpt-frontend Skipped Skipped Nov 30, 2026 3:34pm UTC

Request Review

@coderabbitai

coderabbitai Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The frontend, admin panel, and maintenance-mode Vercel configurations now specify Content-Security-Policy directives. The frontend configuration no longer includes a Content-Security-Policy-Report-Only header.

Changes

Content-Security-Policy

Layer / File(s) Summary
Set CSP headers across applications
apps/frontend/vercel.json, apps/admin-panel/vercel.json, apps/maintenance-mode/vercel.json
The configurations define CSP source directives and restrictions. The admin panel allows connections to listed Baergpt API hosts. The frontend removes its report-only header.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Feature

Suggested reviewers: mlnps, aeschi

Merge Risk: Minimal · up to 98607

This change turns on enforced Content Security Policy headers for the frontend, admin panel and maintenance page. No concrete resource that the policies would block was found in the repository. Before release, confirm that the deployed Supabase and API URLs for the admin panel match the allowed connection hosts.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "feat: enforce csp" matches the main change. The PR adds and enforces Content-Security-Policy headers in the vercel.json files of the frontend, admin-panel, and maintenance-mode apps. The ti…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "feat: enforce csp" matches the main change. The PR adds and enforces Content-Security-Policy headers in the vercel.json files of the frontend, admin-panel, and maintenance-mode apps. The title is short and specific. It uses a conventional commit prefix. It does not name the apps, but it does not need to cover every detail.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

A rabbit checks the headers with care,
New source rules are set there.
Frontend drops report-only,
Admin lists API hosts only.
Maintenance keeps framing denied,
Then hops through the fields with pride.

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 734751e5-694c-4ad8-9a40-477bcd49e777
Commits

Reviewing files that changed from the base of the PR and between 954ccb8 and 98607a4.

Files selected for processing: 2

  • apps/admin-panel/vercel.json
  • apps/maintenance-mode/vercel.json

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@mlnps mlnps left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm 👍

This branch was successfully deployed

2 active and 1 inactive deployments
Preview – baergpt-maintenance-mode — 98607a49 Deployed Nov 30, 2026 by vercel[bot]
Preview – baergpt-admin-panel — 98607a49 Deployed Nov 30, 2026 by vercel[bot]
Preview – baergpt-frontend — 98607a49 Deployed Nov 30, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants